/*
*    Qizx/open 3.0 beta
*
* This code is the open-source version of Qizx.
* Copyright (C) 2004-2009 Axyana Software -- All rights reserved.
*
* The contents of this file are subject to the Mozilla Public License 
*  Version 1.1 (the "License"); you may not use this file except in 
*  compliance with the License. You may obtain a copy of the License at
*  http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
*  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
*  for the specific language governing rights and limitations under the
*  License.
*
* The Initial Developer of the Original Code is Xavier Franc - Axyana Software.
*
*/
using System;
namespace System.Qizx.Api.FullText
{
	
	
	/// <summary> Pluggable factory of Full-text resources.
	/// <p>
	/// Allows redefining the way resources like full-text Tokenizer,
	/// Stemmer and Thesaurus are created and accessed.
	/// <p>The default Fulltext Provider provides a language-independent tokenizer,
	/// no stemmer, no stop-word list, no thesaurus.
	/// <p>Note: stopword lists are not supported.
	/// </summary>
	public interface FullTextFactory
	{
		/// <summary> Returns an instance of TextTokenizer suitable for the specified
		/// language.
		/// </summary>
		/// <param name="languageCode">an ISO language code (e.g 'en', 'fr-CH'), or null if
		/// no language is specified, in which case a generic tokenizer
		/// ({@link System.Qizx.Api.Util.FullText.DefaultTextTokenizer})
		/// is provided.
		/// </param>
		/// <returns> a new instance of a WordTokenizer.
		/// </returns>
		TextTokenizer getTokenizer(string languageCode);
		
		/// <summary> Returns an appropriate Stemmer for the language, if any.</summary>
		/// <param name="languageCode">
		/// </param>
		/// <returns> an instance of a Stemmer, or null if no applicable stemmer can
		/// be found,
		/// </returns>
		Stemmer getStemmer(string languageCode);
		
		/// <summary> Returns a Thesaurus lookup driver. This driver is searched using the
		/// URI and the language code. It is then assumed to restrict lookup to the
		/// specified relationship.
		/// </summary>
		/// <param name="uri">identifier of the Thesaurus. It is the string "default" if
		/// the default thesaurus is invoked.
		/// </param>
		/// <param name="languageCode">a normalized language code like "en" or "fr-CH".
		/// A null language code is in principle not meaningful.
		/// </param>
		/// <param name="relationship">relationship from root word(s) to
		/// thesaurus-equivalent words.
		/// </param>
		/// <param name="levelMin">minimum number of relationship levels crossed.
		/// <b><em>For future use: currently not implemented</em></b>.
		/// </param>
		/// <param name="levelMax">maximum number of relationship levels crossed
		/// <b><em>For future use: currently not implemented</em></b>.
		/// </param>
		/// <returns> an instance of a Thesaurus, or null if it cannot be found,
		/// </returns>
		Thesaurus getThesaurus(string uri, string languageCode, string relationship, int levelMin, int levelMax);
		
		
		/// <summary> Returns a scoring algorithm.</summary>
		/// <returns> an implementation of Scorer
		/// </returns>
		Scorer createScorer();
	}
}